#ifndef PENGZHUANG_H
#define PENGZHUANG_H
#define RightP 1
#define LeftP 2
#define TopP 3
#define FallP 4
#define PlankP 5
#include "plank.h"
#include "ball.h"

class pengZhaung{
public:
    static int check(ball*bal)
    {
        if (bal->Bla->geometry().x()>=583)
            return RightP;
        if(bal->Bla->geometry().x()<=0)
            return LeftP;
        if(bal->getY()-bal->getR()<=0)
            return TopP;
        if(bal->Bla->geometry().y()>=560&&(bal->Bla->geometry().x()<bal->pla->getX()||bal->Bla->geometry().x()>bal->pla->getX()+bal->pla->getLength()))
            return FallP;
        if(bal->Bla->geometry().y()>=530&&bal->Bla->geometry().x()>bal->pla->getX()&&bal->Bla->geometry().x()<bal->pla->getX()+bal->pla->getLength())
            return PlankP;
        else
            return 0;
    }
};

#endif // PENGZHUANG_H
